<?php
namespace app\model\frontend;

use think\Model;

use think\facade\Db;

class DiyModel extends Model
{


    public static function single( $diy_id ){

        // global $_W;
        $uniacid = $_GET['i'];
        $sql = 'select * from sh_diy where uniacid=' . $uniacid . ' and id=' . $diy_id ;
        // return pdo_fetch( $sql );
        return Db::query( $sql )[0];

    }
    
    public static function pc_home( ){

        // global $_W;
        $uniacid = $_GET['i'];
        $sql = 'select * from sh_diy where uniacid=' . $uniacid . ' and platform="pc"';
        return pdo_fetch( $sql );
        // return Db::query( $sql )[0];

    }
}